{% block sw_condition_value_content %}
<div class="sw-condition-customer-custom-field sw-condition__condition-value">
    {% block sw_condition_customer_custom_field_field %}
    <sw-entity-single-select
        ref="selectedField"
        v-model:value="selectedField"
        entity="custom_field"
        :criteria="customFieldCriteria"
        :placeholder="$tc('global.sw-condition.condition.lineItemCustomField.field.customFieldSelect.placeholder')"
        :disabled="disabled || undefined"
        size="medium"
        show-clearable-button
        @update:value="onFieldChange"
    >
        <template #selection-label-property="slotProps">
            {{ getInlineSnippet(slotProps.item.config.label) || slotProps.item.name }}
        </template>

        <template #result-label-property="slotProps">
            {{ getInlineSnippet(slotProps.item.config.label) || slotProps.item.name }}
        </template>

        <template #result-description-property="slotProps">
            {% block sw_condition_customer_custom_field_field_description %}
            {{ getInlineSnippet(slotProps.item.customFieldSet.config.label) || slotProps.item.customFieldSet.name }}
            {% endblock %}
        </template>
    </sw-entity-single-select>
    {% endblock %}

    {% block sw_condition_customer_custom_field_operator %}
    <sw-condition-operator-select
        v-if="renderedField"
        v-bind="{ operators, condition }"
        :disabled="disabled || undefined"
    />
    {% endblock %}

    {% block sw_condition_customer_custom_field_value %}
    <sw-form-field-renderer
        v-if="renderedField"
        :value="renderedFieldValue"
        :config="renderedField.config"
        :disabled="disabled || undefined"
        size="medium"
        @update:value="renderedFieldValue = $event"
    />
    {% endblock %}
</div>
{% endblock %}
